<blockquote>
    <p>@Application 启动类标识</p>
    <footer>
        <p>通过该注解标识当前类为启动类, 在jar模式下会用到</p>
        <p>@Application(scanPackages = {"com.jants.demo", "com.jants.auth"}) 可以对指定包进行扫描</p>
    </footer>
</blockquote>
<h5>示例1</h5>
<pre class="code brush:java">
    @Application
    public class DemosApplication {

        public static void main(String[] args)  {
            JTomcat.run(DemosApplication.class, 80, "/demo");
        }
    }
</pre>
<h5>示例2</h5>
<pre class="code brush:java">
    @Application(scanPackages = "com.jants.demo")
    public class DemosApplication {

        public static void main(String[] args)  {
            JTomcat.run(DemosApplication.class, 80, "/demo");
        }
    }
</pre>
<h5>示例3</h5>
<pre class="code brush:java">
    @Application(scanPackages = {"com.jants.demo", "com.jants.auth"})
    public class DemosApplication {

        public static void main(String[] args)  {
            JTomcat.run(DemosApplication.class, 80, "/demo");
        }
    }
</pre>
<script type="text/javascript">
    $(function () {
        SyntaxHighlighter.highlight();
        $(".toolbar").remove();
    });
</script>